package request

import "mime/multipart"

type UploadFileRequest struct {
	UploadType string                `json:"type" form:"type" validate:"required"`
	File       *multipart.FileHeader `json:"file" form:"file" validate:"required"`
	Filename   string                `json:"filename" form:"filename" validate:"required"`
}

type ImportRequest struct {
	Id int64 `json:"source_id" form:"source_id" validate:"required"`
}

// SliceUploadFileRequest 切片上传文件请求
type SliceUploadFileRequest struct {
	UploadFileRequest
	ChunkIndex  int `json:"chunk_index" form:"chunk_index" validate:"omitempty"`
	TotalChunks int `json:"total_chunks" form:"total_chunks" validate:"omitempty"`
}

func NewSliceUploadFileRequest() *SliceUploadFileRequest {
	return &SliceUploadFileRequest{}
}
